package com.situ.day4;


/**
 * Java是单继承的
 * 如果一个类不继承任何一个类，默认继承Object
 */
public class Person extends Object{
    protected int id;
    //子类可以访问到
    protected String name;
    protected int age;
    protected String className;

    public Person() {
        super();
    }

    public Person(int id, String name, int age) {
        super();
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public void show() {
        System.out.println("Person.show");
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
